const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
    entry: {
        register:'../file_upload/src/register_entry.js'
    },
    plugins: [
        new HtmlWebpackPlugin({
            filename: 'register.html',
            template:'../file_upload/src/register.html'
        }),
    ],
    output: {
        filename: '[name].[hash].js',
    },
    module: {
        loaders: [
            {
                test: /\.html$/,
                use: 'html-loader'
            },
            {
                test: /\.(png|svg|jpg|gif)$/,
                use: [
                    'file-loader'
                ],
                rules:[{
                    test:/\.css$/,
                    use: ['style-loader', 'css-loader'],
                }]
            }
        ],
    },
};